﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using StudentCouncil.BLL.Mgr;
using StudentCouncil.Model;
using StudentCouncil.Model.Models;
using StudentCouncil.Model.Parameter;
using System;
using System.Collections.Generic;
using System.Text;

namespace StudentCouncil.UnitTest
{
    [TestClass]
    public class AssociationText
    {
       
        [TestMethod]
        public void TestAdd()
        {
            var entity = new Association
            {
                //AssociationId = 10,
                Assname = "太极社",
                Assaddress = "东一102",
                Zdteacher = "晓涛",
                Asschairman = "潮涨"
            };
            bool res = AssociationMgr.AddAssociation(entity);
        }
        [TestMethod]
        public void Testid()
        {
            int id = 1;
            Association a = AssociationMgr.GetAssociationById(id);
        }

        [TestMethod]
        public void Testcheckid()
        {
            int id = 1;
            bool success = AssociationMgr.CheckAssociationById(id);
        }
        [TestMethod]
        public void Testupdate()
        {
            var entity = new Association
            {
                AssociationId = 10,
                Assname = "太极社",
                Assaddress = "东一102",
                Zdteacher = "晓涛",
                Asschairman = "潮涨"
            };
            bool success = AssociationMgr.AssociationUpdate(entity);
        }
        [TestMethod]
        public void Teststatusupdate()
        {
            var entity = new Associationstatus
            {
                AssociationId = 2,
                Status = "已通过"
            };
            var success = AssociationMgr.AssociationstatusUpdate(entity);
        }

    }
}
